<%@ page language="java" contentType="text/html; charset=UTF-8"
	pageEncoding="UTF-8"%>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<%@ include file="/web/common.jsp"%>
<link rel="stylesheet" type="text/css" href="${path }/web/res/home/home.css"/>
<style type="text/css">
</style>
<script type="text/javascript">
var Home={};
Home.tabIndex=0;
Ext.require(['*']);
Ext.onReady(function() {

    Ext.QuickTips.init();
    Ext.state.Manager.setProvider(Ext.create('Ext.state.CookieProvider'));

    Home.mainTabPanel= Ext.create('Ext.tab.Panel', {
         region: 'center',
         deferredRender: false,
         activeTab: 0,    
         items: [{
             contentEl: 'center1',
             title: '使用说明',
             bodyPadding: 10,
             autoScroll: true
         }]
     });
    var viewport = Ext.create('Ext.Viewport', {
        id: 'border-example',
        layout: 'border',
        items: [
        Ext.create('Ext.Component', {
            region: 'north',//顶部区域
            height: 65,
            margins: '0 0 0 0',
            contentEl: 'Title_Logo'
        }), {
            region: 'west',
            stateId: 'navigation-panel',
            id: 'west-panel', // see Ext.getCmp() below
            title: '功能菜单',
            split: true,
            width: 200,
            minWidth: 175,
            maxWidth: 400,
            collapsible: true,
            animCollapse: true,
            margins: '0 0 0 5',
            layout: 'accordion',
            items: [{
                contentEl: 'app_menu',
                title: '业务处理',
                iconCls: 'application_list'
            }, {
                title: '系统管理',
                contentEl: 'manage_menu',
                iconCls: 'settings'
            }, {
                title: '报表统计',
                contentEl: 'report_menu',
                iconCls: 'info'
            }]
        },Home.mainTabPanel]
    });
});

Home.toUrl=function(title,url){
    var exit = false;
    var tabid = null;
    Home.mainTabPanel.items.each(function(item) {
         if (item.title == title) {
             tabid = item.id;
             exit = true;
         }
    });
    
    if (exit) {
    	Home.mainTabPanel.setActiveTab(tabid);
        return;
    }
    if(CommonUtil.isNull(url))url=Config.path+'/web/jsp/test.jsp';
      
    Home.mainTabPanel.add({
         title:title,
         id:"newtab"+Home.tabIndex,
         html:'<iframe id="framenewtab'+Home.tabIndex+'" name="framenewtab'+Home.tabIndex+'" src="'+url+'" frameborder="0" marginheight="0" marginwidth="0" scrolling="auto" style="width:100%; height:100%;" />',
         iconCls:'page',
         closable:true
    });
    Home.mainTabPanel.setActiveTab("newtab"+Home.tabIndex);
    Home.tabIndex++;
}

</script>
</head>
<body>
<div id="app_menu" class="x-hide-display">
	<ul class="leftMenus">
	    <li><a href="javascript:Home.toUrl('未处理订单','web/jsp/def.jsp');">订单(未处理)</a></li>
	    <li><a href="javascript:Home.toUrl('处理中订单','web/jsp/def.jsp');">订单(处理中)</a></li>
	    <li><a href="javascript:Home.toUrl('已完成订单','web/jsp/def.jsp');">订单(已完成)</a></li>
	    <li><a href="javascript:Home.toUrl('已取消订单','web/jsp/def.jsp');">订单(已取消)</a></li>
	</ul>
</div>

<div id="manage_menu" class="x-hide-display">
	<ul class="leftMenus">
	    <li><a href="javascript:Home.toUrl('商品管理','web/jsp/def.jsp');">商品管理</a></li>
	    <li><a href="javascript:Home.toUrl('会员管理','web/jsp/def.jsp');">会员管理</a></li>
	    <li><a href="javascript:Home.toUrl('职员管理','web/jsp/def.jsp');">职员管理</a></li>
	    <li><a href="javascript:Home.toUrl('分店管理','web/jsp/def.jsp');">分店管理</a></li>
	    <li><a href="javascript:Home.toUrl('字典管理','web/jsp/dict.jsp');">字典管理</a></li>
	</ul>
</div>

<div id="report_menu" class="x-hide-display">
	<ul class="leftMenus">
	    <li><a href="javascript:Home.toUrl('订单统计','web/jsp/def.jsp');">订单统计</a></li>
	    <li><a href="javascript:Home.toUrl('会员统计','web/jsp/def.jsp');">会员统计</a></li>
	</ul>
</div>
<div id="center1" class="x-hide-display">
    <p><b>Done reading me? Close me by clicking the X in the top right corner.</b></p>
</div>
<div id="Title_Logo" class="x-hide-display">
<div class="logo">&nbsp;</div>
</div>

</body>
</html>
